// 下个监听函数的参数默认值是传递的参数，但可以接受上个监听函数的返回值
const { SyncWaterfallHook } = require("tapable")

const hook = new SyncWaterfallHook(["name", "age"])

hook.tap("fn1", function (name, age) {
    console.log(`fn1=====>${name},${age}`)
    return "res1"
})


hook.tap("fn2", function (name, age) {
    console.log(`fn2=====>${name},${age}`)
    return "res2"
})

hook.tap("fn3", function (name, age) {
    console.log(`fn3=====>${name},${age}`)
    return "res3"
})

hook.call("lx", 25)